About the Frame Sheet Anims library
 

Frame Sheet Animation Library


      This library takes a Frame Sheet approach to animation. What's a Frame Sheet ? - It's an image that contains the animation frames laid out in grid form. The frames are arranged upon the image from the top left corner across ways, then stepping down. The frames must be arrange in order they are to be played back and all frames must have a uniform width and height. Also, the library contains a loader function for loading animations that are stored as groups of sequentially numbered image files. E.g. Image1.bmp,Image2.bmp etc etc

      Once our frame sheets are imported, we then create animation handlers using any of any previously created frame sheets. Each anim has it's own set of properties (such as Speed, Anim method etc etc). Each refresh, we either update our anims locally via StepAnim(MyAnim) or globally by StepAllAnims(). These functions will move our anim(s) to the next frame within there associated frame sheet.

      In the case of StepAnim(), this function also returns the current Image index of this anim each call. So animating an Image is simply -> DrawImage StepAnim(MyAnim),Xpos,Ypos,TransparentFlag. You can also query the current image from the Animation using the GetAnimImage() function.

      The pro's of the frame sheet approach is that's relatively easy to implement and understand for the user, but there's also a few negatives you should be aware of. The most obvious issues with such frame sheets are that the frames must be in order, all frames must be the same size and aligned perfectly upon image in a grid. So if your frames aren't, then you'll either have to arrange the frame sheet image(s), or roll a custom loader. There's already a few helper functions built into the library for this purpose.


     USAGE


      As with all external libraries, you need to include them in your project using the #Include directive. When you want to use the commands and functions that this library provides, add the following line to the top of your main source file:

  
  #Include "FrameSheetAnims"
  


     In order to enable keyword highlighting and context help for this library, click on "Library Highlighters" in the "Projects" menu and tick "FrameSheetAnims.pli".



     SAMPLE FRAME SHEET

      Here's an example frame sheets showing an explosion animation set out in a grid fashion.








 
Related Info: :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com